Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: add basic health check service #8121

Merged
merged 3 commits into from
Jun 20, 2017
Merged

Conversation

gyuho
Copy link
Contributor

@gyuho gyuho commented Jun 16, 2017

Address #8022.

This PR uses the default grpc health server https://github.com/grpc/grpc-go/blob/master/health/health.go. Any other suggestion?

Balancer logic is not implemented in this PR.

@gyuho gyuho added the WIP label Jun 16, 2017
@@ -463,6 +466,15 @@ func (c *Client) checkVersion() (err error) {
// ActiveConnection returns the current in-use connection
func (c *Client) ActiveConnection() *grpc.ClientConn { return c.conn }

// CheckHealth checks the health status of gRPC server of current connection.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't expose through clientv3 yet? User can get this by healthpb.NewHeathClient(c.ActiveConnection()) already

)

func TestHealth(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be in integration/ instead of clientv3/integration/ since it's mostly only testing the server

@@ -937,6 +937,10 @@ func (c *ClusterV3) Client(i int) *clientv3.Client {
return c.clients[i]
}

func (c *ClusterV3) TerminateMember(t *testing.T, i int) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Members is already exported out of ClusterV3; function is unnecessary?

@gyuho gyuho changed the title [DO NOT MERGE] *: add basic health check service *: add basic health check service Jun 20, 2017
@gyuho gyuho removed the WIP label Jun 20, 2017
@gyuho gyuho force-pushed the health-check-service branch 2 times, most recently from d0bfd87 to 031d3ce Compare June 20, 2017 18:59
@gyuho
Copy link
Contributor Author

gyuho commented Jun 20, 2017

@heyitsanthony PTAL.

@@ -0,0 +1,40 @@
// Copyright 2017 The etcd Authors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just v3_health_test.go?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants